/*
 * TipoCliente.java
 *
 * Created on January 16, 2007, 7:32 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package br.com.hstar.model.cliente;


import java.io.Serializable;

/**
 *
 * @author jmaior
 */
public class TipoClienteDO implements Serializable {
    
    private Long id;
    private String descricao;
    
    /** Creates a new instance of TipoCliente */
    public TipoClienteDO() {
        super();
    }

    public TipoClienteDO(Long id) {
        super();
        this.setId(id);
    }
    
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getDescricao() {
        return descricao;
    }

    public void setDescricao(String descricao) {
        this.descricao = descricao;
    }
    
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || !(o instanceof TipoClienteDO)) {

            return false;
        }

        TipoClienteDO other = (TipoClienteDO)o;

        // if the id is missing, return false
        if (id == null) return false;

        // equivalence by id
        return id.equals(other.getId());
    }

    public int hashCode() {
        if (id != null) {
            return id.hashCode();
        } else {
            return super.hashCode();
        }
    }

    public String toString() {
        return this.getClass().getName()
            + "[id=" + id + "]";
    }
}
